package com.guli.cart.vo;


import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.List;

public class CartItemVo {

    /**
     * 是否选中
     */
    @Setter @Getter
    private Boolean check = true;
    @Setter @Getter
    private Long skuId;
    @Setter @Getter
    private String title;
    @Setter @Getter
    private String image;

    /**
     * 商品套餐属性
     */
    @Setter @Getter
    private List<String> skuAttrValues;
    @Setter @Getter
    private BigDecimal price;
    @Setter @Getter
    private Integer count;

    //总计
    private BigDecimal totalPrice;

    //总计
    public BigDecimal getTotalPrice() {
        return price.multiply(new BigDecimal(count));
    }

}
